<template>
    <view class="cu-modal" :class="{'show': visible}">
        <view class="rule-mask" @click="close"></view>
        <view class="cu-dialog" style="background-color: transparent; width:100%">
            <view class="relative wrapper">
                <image :src="resource.red_envelope_rain_rule" webp class="rule" mode="widthFix"/>
            </view>
            <view class="paddingT30 flex-align-center">
                <image :src="resource.close" class="x" @click="close" />
            </view>
        </view>
    </view>
</template>

<script>
import resource from '@/utils/resource'
export default {
    data() {
        return {
            resource,
            visible: false
        }
    },
    methods: {
        show() {
            this.visible = true
        },
        close() {
            this.visible = false
        }
    }
}
</script>

<style lang="scss" scoped>
.rule-mask {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
}
.wrapper {
    z-index: 1001;
    width: 640rpx;
    height: 700rpx;
    margin: 0 auto;
    position: relative;
    .rule {
        width: 640rpx;
        height: 0
    }
}
.x {
    width: 60rpx;
    height: 60rpx;
}
</style>